package com.example.day08.homework;

public class NameToUplower {

    public static void main(String[] args) {
        System.out.println(nameToUplower("str_myname"));
    }

    public static String nameToUplower(String name){
        int index=name.indexOf("_");
        StringBuilder stringBuilder=new StringBuilder();
        char[] c=name.toCharArray();
        for (int i = 0; i <name.length() ; i++) {
            if(i==index) continue;
            else if(i==index+1) stringBuilder.append((char)(c[i]-32));
            else stringBuilder.append(c[i]);
        }
        return stringBuilder.toString();
    }

}
